using System;
using PDUConverter;

namespace Communication
{
    /// <summary>
    /// Provides data for the error events that deal with message sending.
    /// </summary>
    public class MessageErrorEventArgs : MessageEventArgs
    {
        /// <summary>
        /// Initializes a new instance of the MessageErrorEventArgs.
        /// </summary>
        /// <param name="pdu">The message that failed sending.</param>
        /// <param name="exception">The exception that caused the error.</param>
        public MessageErrorEventArgs(OutgoingSmsPdu pdu, Exception exception) : base(pdu)
        {
            Exception = exception;
        }

        /// <summary>
        /// Gets the exception that caused the error.
        /// </summary>
        public Exception Exception { get; private set; }
    }
}